<ui:composition template="/admin/templates/ui2.xhtml"
	xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:composite="http://java.sun.com/jsf/composite/primefaces"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:p="http://primefaces.org/ui"
	xmlns:archer="http://java.sun.com/jsf/archer"
	xmlns:fn="http://java.sun.com/jsp/jstl/functions"
	xmlns:c="http://java.sun.com/jsp/jstl/core">

	<ui:define name="content">
		<link rel="stylesheet" type="text/css" href="/include/css/jscover.css" />
		<script type="text/javascript">
			//<![CDATA[
			function upload() {
				var upload = $("#form\\:upload").val();
				alert(upload);
			}
			//]]>
		</script>

		<div class="entry">
			<p:toolbar styleClass="admin-nav-toolbar">
				<p:toolbarGroup>
					<h:outputLabel value="#{commonMsg.currentPositionLabel} 记录导入"></h:outputLabel>
				</p:toolbarGroup>
			</p:toolbar>
			<p:spacer></p:spacer>
			<h:form id="form" enctype="multipart/form-data">
				<p:panel id="filters">
					<h:panelGrid columns="2" columnClasses="col1,col2" id="panel">
						
						<h:outputLabel value="导出文件名称："></h:outputLabel>
						<h:inputText label="导出文件名称：" id="fileName" value="#{bugSummaryHome.bugSummaryFile.fileName}"></h:inputText>
						<h:outputLabel value="项目名称："></h:outputLabel>
						<h:inputText label="项目名称" id="projectName" value="#{bugSummaryHome.bugSummaryFile.projectName}"  required="true"></h:inputText>
						<h:outputLabel value="版本："></h:outputLabel>
						<h:inputText label="版本" id="version" value="#{bugSummaryHome.bugSummaryFile.version}" required="true"></h:inputText>
						<h:outputLabel value="编制单位："></h:outputLabel>
						<h:inputText label="编制单位" id="unit" value="#{bugSummaryHome.bugSummaryFile.unit}" required="true"></h:inputText>
						<h:outputLabel value="编制人员："></h:outputLabel>
						<h:inputText label="编制人员" id="maker" value="#{bugSummaryHome.bugSummaryFile.maker}" required="true"></h:inputText>
						<h:outputLabel value="项目经理："></h:outputLabel>
						<h:inputText label="项目经理" id="projectManager" value="#{bugSummaryHome.bugSummaryFile.projectManager}" required="true"></h:inputText>
						<h:outputLabel value="技术经理："></h:outputLabel>
						<h:inputText label="技术经理" id="techManager" value="#{bugSummaryHome.bugSummaryFile.techManager}" required="true"></h:inputText>
						<h:outputLabel value="测试起始时间："></h:outputLabel>
						<p:calendar  label="测试起始时间"
								value="#{bugSummaryHome.bugSummaryFile.testStartDate}" required="true"
								pattern="yyyy-MM-dd" navigator="true" showButtonPanel="true"></p:calendar>
							
						<h:outputLabel value="测试结束时间："></h:outputLabel>
						<p:calendar  label="测试结束时间"
								value="#{bugSummaryHome.bugSummaryFile.testEndDate}" required="true"
								pattern="yyyy-MM-dd" navigator="true" showButtonPanel="true"></p:calendar>
						<h:outputLabel value="导入文件："></h:outputLabel>
						<ui:fragment>
							<!-- <br/> -->
							<p:fileUpload value="#{bugSummaryHome.file}" mode="simple" onfocus="upload();"
								label="文件上传" sizeLimit="1000000" id="upload" required="true" 
								allowTypes="/(\.|\/)(xls/xlsx)/">
							</p:fileUpload>
							
							<h:outputLabel value="*请上传Excel(2003以上版本)格式的文件，文件拓展名为.xlsx"
								style="color: red;"></h:outputLabel>
						</ui:fragment>
						
						<h:outputLabel value="模块名称："></h:outputLabel>
						<ui:fragment>
							<h:inputText label="模块名称" id="module" value="#{bugSummaryHome.module}" required="true"></h:inputText>
							<h:outputLabel value="*多个模块名称请以逗号分隔"
								style="color: red;"></h:outputLabel>
						</ui:fragment>
						
						<h:outputLabel value="操作："></h:outputLabel>

						<ui:fragment>
							<p:commandButton value="生成报告" ajax="false" id="import"
								action="#{bugSummaryHome.importExcel}" type="submit"
								oncomplete="document.getElementById('form:upload').disabled=true;"></p:commandButton>
						</ui:fragment>

					</h:panelGrid>
				</p:panel>
			</h:form>
		</div>
	</ui:define>
</ui:composition>

